package tech.aistar.corejava.test.prototype;

public class PersonalOrder extends AbstractOrder {
	/**
	 * 个人客户姓名
	 */
	private String customerName; 
	 
	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder("PersonalOrder{");
		sb.append("customerName='").append(customerName).append('\'');
		sb.append('}');
		return sb.toString();
	}

	/**
	 * 个人订单实现 自身克隆
	 */
	@Override
	public IOrderProcess cloneOrder() {
		PersonalOrder cloneObject = new PersonalOrder(); 
		cloneObject.setCustomerName(this.getCustomerName());
		cloneObject.setOrderProductNum(this.getOrderProductNum());
		cloneObject.setProductId(this.getProductId());
		return cloneObject;
	}

	
	
}
